/**
 * Progetto PRAISED.
 * 24/gen/2011
 */
package it.uniroma3.engine.model;

/**
 * Token : This class represents one single term present in the input text and the information about its annotation
 * 
 * @author Accosta Augusto
 * @author Lopez Elisabetta
 *
 */
public class Token {

	private String token; // this variable represents token's content
	private boolean isAnnotated; // this variable indicates if the token was annotated by the PNI module
	
	/**
	 * Construct no-arg
	 */
	public Token(String token) {
		this.setToken(token);
		this.setAnnotated(false);
	}
	
	/**
	 * Construct
	 * @param token
	 * @param isAnnotated
	 */
	public Token(String token, boolean isAnnotated) {
		this.setToken(token);
		this.setAnnotated(isAnnotated);
	}

	/**
	 * @param token the token to set
	 */
	public void setToken(String token) {
		this.token = token;
	}

	/**
	 * @return the token
	 */
	public String getToken() {
		return token;
	}

	/**
	 * @param isAnnotated the isAnnotated to set
	 */
	public void setAnnotated(boolean isAnnotated) {
		this.isAnnotated = isAnnotated;
	}

	/**
	 * @return the isAnnotated
	 */
	public boolean isAnnotated() {
		return isAnnotated;
	}
	
	/**
	 * Equals Method
	 * @param t1
	 * @return true if the object are equals
	 */
	public boolean equals(Token t1) {
		return this.getToken().equals(t1.getToken());
	}
}
